﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using StairsModuleAndEdit.StairsModel.CommonUnit;
using StairsModuleAndEdit.StairsModel.Manage;

namespace StairsModuleAndEdit.StairsModel.DataInfos
{
	public class CrossingStairs : BaseCommonStairs
	{
		public CrossingStairs()
		{
			base.m_sName = "交叉楼梯";
		}

		public CrossingStairs(StairsCreator Creator)
		{
			base.m_sName = "交叉楼梯";
			this.m_StairsCreator = Creator;
		}

		public override void DrawStairs()
		{
			CrossingStairsCreator crossingStairsCreator = this.m_StairsCreator as CrossingStairsCreator;
			if (crossingStairsCreator != null)
			{
				crossingStairsCreator.CreateCrossingStairs(this);
			}
		}

		public void TransFormRailPoints()
		{
			foreach (BaseRaillingData baseRaillingData in this.m_listRail)
			{
				baseRaillingData.m_ptStart = Geometry.TransformPoint(baseRaillingData.m_ptStart, base.m_Transform);
			}
		}

		public void TransFormOutSupportPoints()
		{
			List<XYZ> list = new List<XYZ>();
			foreach (XYZ point in this.m_listPointsSupport)
			{
				XYZ item = Geometry.TransformPoint(point, base.m_Transform);
				list.Add(item);
			}
			if (list.Count > 0)
			{
				this.m_listPointsSupport.Clear();
				this.m_listPointsSupport.AddRange(list);
			}
		}

		public double GetStairsWellWidth()
		{
			return this.m_dStairsWidth - this.m_LeftUpRunData.RunWidth * 2.0;
		}

		public double m_dStairsWidth { get; set; }

		public XYZ m_TransVector { get; set; }

		public double m_dBottomElevation { get; set; }

		public double m_dTopElevation { get; set; }

		public double m_dStairsHigh { get; set; }

		public double m_dLevelValue { get; set; }

		public double m_dBottomOffset { get; set; }

		public double m_dTopOffset { get; set; }

		public FloorType m_FloorType { get; set; }

		public List<string> m_arLandWidth { get; set; }

		private StairsCreator m_StairsCreator;

		public BaseBeamData m_BeamData = new BaseBeamData();

		public BaseLandingData m_LandData = new BaseLandingData();

		public LineRunData m_LeftUpRunData = new LineRunData();

		public LineRunData m_LeftDownRunData = new LineRunData();

		public LineRunData m_RightUpRunData = new LineRunData();

		public LineRunData m_RightDownRunData = new LineRunData();

		public List<XYZ> m_listPointsSupport = new List<XYZ>();
	}
}
